<clr-modal [(clrModalOpen)]="editItemOpened">
  <h3 class="modal-title">编辑</h3>
  <div class="modal-body modal-height">
    <form clrForm #ItemForm="ngForm">
      <clr-input-container>
        <label>名称:</label>
        <input clrInput size=45 maxlength="25" type="text" pattern="{{name_pattern}}" [(ngModel)]="item.name"
               name="name" required>
        <clr-control-helper>{{name_pattern_tip}}</clr-control-helper>
        <clr-control-error>{{name_pattern_tip}}</clr-control-error>
      </clr-input-container>
      <clr-input-container>
        <label>描述:</label>
        <input clrInput size=45 maxlength="255" type="text" [(ngModel)]="item.description"
               name="description" required>
      </clr-input-container>
    </form>
    <div class="modal-footer">
      <button type="button" class="btn btn-outline" (click)="onCancel()" [disabled]="isSubmitGoing">取消</button>
      <button type="submit" class="btn btn-primary" (click)="onSubmit()" [disabled]="ItemForm.invalid">提交
      </button>
    </div>
  </div>
</clr-modal>

